<?php
namespace Home\Model;
use Think\Model;
class UserModel extends Model {
    protected $tableName = 'users'; 

    //用户注册判断
    public function is_res($uid){
    	return true;
    }

    //用户停用判断
    public function is_forbiden($uid){
    	return true;
    }

    //用户登录状态判断
    public function is_login($token){
    	$data['token'] = $token;
    	$data['logout_time'] = array('neq',NULL);
    	$res = M('UserToken')->where($data)->select();

    	return  $res == NULL ? false : true ;
    }

}
